package com.lyb.redisspringboot.config;

import com.lyb.redisspringboot.interceptor.KillInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author lyb
 * @create 2022/3/12-19:02
 * @method
 */
@Configuration
public class KillConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new KillInterceptor())
                .addPathPatterns("/kill");

    }
}
